﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Runtime.Serialization.Json;

namespace Tomato.Serialization
{
    public class JsonDeserializer : Deserializer
    {
        public override T Deserialize<T>(Stream stream)
        {
            DataContractJsonSerializer s = new DataContractJsonSerializer(typeof(T));
            return (T)s.ReadObject(stream);
        }
    }
}
